#设置代理
from winproxy import ProxySetting

p = ProxySetting()

def set_proxy():
    """设置系统代理"""
    p.enable = True
    p.server = '127.0.0.1:8080'
    p.registry_write()


def close_proxy():
    """关闭系统代理"""
    p.enable = False
    p.registry_write()